clear; close all; addpath('../utilities');

load Figure_7_out EIV Asset_IV Asset_IV_noIdio KS_vec MON_values prob_sim


% load IV data
IV_data = xlsread('../data/IV_Skew_data.xlsx','E3:E33');
SM_data = -1.5:0.1:1.5;


ff = figure('Position', [100, 100, 480, 400]);
set(ff,'Units','Inches');
pos = get(ff,'Position');
set(ff,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
subplot = @(m,n,p)subtightplot(m, n, p, [0.1 0.1], [0.14 0.02], [0.11 0.03]);
subplot(1,1,1);

plot(SM_data,100*IV_data,'k--','LineWidth',1.5); set(gca,'FontSize',13); hold on
plot(KS_vec,100*EIV,'r','LineWidth',1.5); set(gca,'FontSize',12); hold off
axis([-1.5,0.5,0,45]);
grid on; xlabel('Moneyness','FontSize',15); ylabel('Implied volatility (%)','FontSize',15);
hold on;
plot(MON_values,prob_sim'*Asset_IV*100,'b:','LineWidth',1.5);
plot(MON_values,prob_sim'*Asset_IV_noIdio*100,'b-.','LineWidth',1.5);
leg=legend('Equity options (data)','Equity options (model)','Asset options (model)','Aggregate asset options (model)','Location','NE'); set(leg,'FontSize',13,'color','none');
hold off; box off;

print(gcf,'figure_7','-dpdf','-r0');

